#include "Camera.h"


Camera::Camera(void) : m_position(0.0f, 0.0f, 0.0f), m_target(0.0f,0.0f,0.0f), m_up(0.0f, 1.0f, 0.0f)
{
}

Camera::Camera(XMFLOAT3 pos, XMFLOAT3 target) : m_position(pos), m_target(target), m_up(0.0f, 1.0f, 0.0f)
{
}

Camera::~Camera(void)
{
}


void Camera::SetPosition(XMFLOAT3 pos, XMFLOAT3 target)
{
  this->m_position = pos;
  this->m_target = target;
}

XMMATRIX Camera::GetViewMatrix()
{
  return XMMatrixLookAtLH(XMLoadFloat3(&this->m_position), XMLoadFloat3(&this->m_target), XMLoadFloat3(&this->m_up));
}